package com.iot.modbus.route.impl;

import com.iot.modbus.manager.WriterSessionManager;
import com.iot.modbus.route.WriterSessionRoute;
import com.serotonin.modbus4j.exception.ErrorResponseException;
import com.serotonin.modbus4j.exception.ModbusTransportException;
import com.serotonin.modbus4j.ip.IpParameters;

public class SimpleWriterSessionRoute implements WriterSessionRoute {
    @Override
    public void writeInt16(IpParameters ipParameters, int startOffset,Object values) throws ModbusTransportException, ErrorResponseException {
        WriterSessionManager.get(ipParameters).writeInt16(startOffset, values);
    }

    @Override
    public void writeFloat32(IpParameters ipParameters, int startOffset, Object values) throws ModbusTransportException, ErrorResponseException {
        WriterSessionManager.get(ipParameters).writeFloat32(startOffset, values);
    }
}
